Macros
Macros enable you to establish mathematical relationships between budget codes. There are two different types of macros.
- Horizontal macros enable the correspondence between Operational Budget codes and Treasury Budget codes. The Treasury Budget amounts can then be calculated on the basis of the Operational Budget amounts. For example, in the Treasury Budget, you can break down the collection of a sale saved as a unique transaction in the Operational Budget.
- Vertical macros define logical relationships between budget codes of a same budget.
For example, you can calculate the amount of fringe benefits on the basis of salaries.
You can create several macros for one budget code. Later on, when setting up the designer, you will be able to select one macro to apply to one budget code.
The range of possibilities in terms of calculation is wide. Here are some examples:
- Distribution of an amount on different budget codes
- Breakdown of the collection of a sale over a period of time
You can create a default macro for all the budget codes with identical amount and date, both in the Operational and Treasury Budgets.
To defer or break down the amounts of a budget code over time, distribute them on several budget codes, or associate them with a logical condition, you need to create a customized macro. Macros can include several lines of script.
Important
If you are a new user, see topics Macros Wizard and Examples of Macros.
If two users are working on the same database, the user who created a macro first is the only one authorized to create more macros during the session.

In the Modules Tasks pane, select the Macro option from the Setup folder of the Liquidity module.
- If no filter has been set up for macros, the filter configuration page is displayed.
The macro filters enables you to set up selection criteria to determine the macros to display in the setup page for macros.
See the following topic for more information on setting up filters for Macros.
- If a filter has already been set up, the Macro page is displayed with a list of the set up macros in a table.
For more information on:
- Reorganization of the lines display in the table, click here
- how to search text in the table, click here
- how to create lines, see the topic below,
- modifying lines in the table, click here
- deleting lines in the table, click here
You can change the layout of the table: columns display, filtering on selection criteria, lines grouping according to criteria, etc. For more information on this feature, see topic Table Reorganization.

This function enables you to create simple macros automatically: the relationship established between a budget code of the Operational Budget and its match in the Treasury Budget includes neither calculation, nor deferment.
In the toolbar at the top of the setup page for macros, click the Create Default Macros button.
A standard macro is created for each budget code (and not system budget code) which has no macro.
The new macros are displayed at the end of the macros table.

- In the setup page for macros, click the Create button.
The creation page is displayed.
- In the Description field, enter a description for the macro.
You can also modify the unique code automatically entered in the Code field. - Select the budget code associated with the macro, as follows:
- Click the button
in the Budget Code area.
A contextual window shows the list of the available budget codes.
- To select a budget code in the list, double-click the corresponding line or click the corresponding line, then click OK.
The code and description of the budget code are displayed in the creation page for macros.
The Script area is enabled and you can define the calculation formula of the macro.
- Select the Default Macros if you want this macro to be the default macro for this budget code.
As a consequence, when you define your budget sheet structure, this is the proposed default macro for the selected budget code.
Info
The OBS Use and TBS Use options are always dimmed, and automatically selected once the formula is set up. You do not have to do anything for these options.
- To define each line of the formula, different methods are available:
- You can launch the Macros Wizard by clicking Macros Wizard (recommended for new users).
For more information, refer to topic Macros Wizard. - You can define manually a macro using the Arithmetical operators, Budget Codes and Period Steps buttons (for advanced users).
See topic Macros: functions, keywords and syntax in the Appendices for more information on the available options.
- To insert budget codes, arithmetical operators, dates or periods, click the corresponding buttons and then, in the contextual menu, click a line to select it.
- If you want to refer to a budget code in the Treasury Budget, insert an arobase (@ sign) after the budget code (without spaces).
Before inserting elements, it is important to position your cursor in the right place inside the entry field.
- You can also create the formula by manual entry of keywords and operators (for expert users).
- You may also copy the formula from an existing macro, and use it as it is or modify it.
To copy the formula, click the Macros button, then, in the contextual window, click a line to select the corresponding macro. The matching formula is copied in the Script field.
Info
Concerning numerical values, the decimal separator is the period and not the comma.
- To define an additional formula, position your cursor on the first line of the area displaying formulas.
Each new formula is added below and the first created formula remains at the top of the list.
The OBS Use and TBS Use options are automatically selected, once the macro formulas are set up.
- The automatic selection of the OBS option means that the Operational Budget is used.
- The automatic selection of the TBS Use option means that the Treasury Budget is used.

The filters specific to macros, enable you to define the filtering criteria for the display of macros in the corresponding setup page.
You need to have previously defined at least one macro filter to access the macro setup.
- In the Filters toolbar on the setup page for macros, click the Actions button, then select the Add option.
The creation page for macro filters is displayed.
This page enables the definition of unique identification information for the filter.
- Enter a code and a description for the filter in the Code and Description fields.
- Select the Template Default Filter option, if you want this filter to be applied by default when accessing the setup page for macros.
- If you want this filter to be only accessible by yourself, select the Private option.
- You may add comments in the Text field (optional).
- Click the Configure button to set up the filter settings.
The configuration page for filter settings is displayed.
- In the Budget Code Selection area of the Codes tab, enable the option:
- All to display the macros associated with the standard budget codes and the system budget codes,
- Budget Code to display only the macros associated with a standard budget code,
- System Codes to display only the macros associated with a system budget code.
- In the Budget Codes area, click the button Select to display the list of the set up budget codes. In the contextual window, enable the options corresponding to the budget codes that you want to select. Click the button
to validate your selection.
The selected budget codes are displayed in the Budget Codes area. The macros specific to the selected budget codes are displayed in the setup page for macros.
- Click the Options tab.
- In the Use in area, enable the option:
- All to cancel filtering at this level,
- Only OBS and Only TBS to display only the macros that involve both the Operational Budget and the Treasury Budget,
- Only OBS to display only the macros that involve the Operational Budget,
- Only TBS to display only the macros that involve the Treasury Budget.
- Enable the Default only option to display only the macros defined as default for a budget code.
Info
Each budget code can only have one default macro. This macro is used as default macro for the linked budget code.
- Click the following buttons, as needed:
- OK to save the setup and display the setup page for macros,
- Cancel to cancel the setup and display the setup page for macros,
For more information on the application, modification and deletion of filters, see topic Filters.